package ex.com.jm.food.entity;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
/**
 * 属性实体层
 * @author zhaojw
 *
 */
@Entity
@Table(name="jm_attr")
public class Attr implements Serializable {

	
	private static final long serialVersionUID = 1L;
	@Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name="attr_id",nullable=false,unique=true,length=11)
    private Integer attrId;//属性主键
	@Column(name="attr_name",nullable=false,unique=true,length=32)
    private String attrName;//属性名称
	@Column(name="attr_value",length=32)
    private String attrValue;//属性值
	@Column(name="attr_type",length=11)
    private Integer attrType;//属性类型
    @ManyToOne
    @JoinColumn(name="sub_id")
    private SubType subId;//小类
    @Column(name="created",length=32)
    private String created;//属性创建时间
    @Column(name="create_id",length=32)
    private String createId;//属性创建者管理员id
	public Integer getAttrId() {
		return attrId;
	}
	public void setAttrId(Integer attrId) {
		this.attrId = attrId;
	}
	public String getAttrName() {
		return attrName;
	}
	public void setAttrName(String attrName) {
		this.attrName = attrName;
	}
	public String getAttrValue() {
		return attrValue;
	}
	public void setAttrValue(String attrValue) {
		this.attrValue = attrValue;
	}
	public Integer getAttrType() {
		return attrType;
	}
	
	public SubType getSubId() {
		return subId;
	}
	public void setSubId(SubType subId) {
		this.subId = subId;
	}
	public void setAttrType(Integer attrType) {
		this.attrType = attrType;
	}
	
	public String getCreated() {
		return created;
	}
	public void setCreated(String created) {
		this.created = created;
	}
	public String getCreateId() {
		return createId;
	}
	public void setCreateId(String createId) {
		this.createId = createId;
	}
	
}

